Optimal. Leaf size=122 \[ -\frac {3 \text {ArcTan}\left (\frac {\sqrt {c} \tan (e+f x)}{\sqrt {2} \sqrt {c-c \sec (e+f x)}}\right )}{4 \sqrt {2} a c^{3/2} f}-\frac {3 \tan (e+f x)}{4 a f (c-c \sec (e+f x))^{3/2}}+\frac {\tan (e+f x)}{f (a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4045, 3881,
3880, 209} \begin {gather*} -\frac {3 \text {ArcTan}\left (\frac {\sqrt {c} \tan (e+f x)}{\sqrt {2} \sqrt {c-c \sec (e+f x)}}\right )}{4 \sqrt {2} a c^{3/2} f}-\frac {3 \tan (e+f x)}{4 a f (c-c \sec (e+f x))^{3/2}}+\frac {\tan (e+f x)}{f (a \sec (e+f x)+a) (c-c \sec (e+f x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3880
Rule 3881
Rule 4045
Rubi steps
\begin {align*} \int \frac {\sec (e+f x)}{(a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}} \, dx &=\frac {\tan (e+f x)}{f (a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}}+\frac {3 \int \frac {\sec (e+f x)}{(c-c \sec (e+f x))^{3/2}} \, dx}{2 a}\\ &=-\frac {3 \tan (e+f x)}{4 a f (c-c \sec (e+f x))^{3/2}}+\frac {\tan (e+f x)}{f (a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}}+\frac {3 \int \frac {\sec (e+f x)}{\sqrt {c-c \sec (e+f x)}} \, dx}{8 a c}\\ &=-\frac {3 \tan (e+f x)}{4 a f (c-c \sec (e+f x))^{3/2}}+\frac {\tan (e+f x)}{f (a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}}-\frac {3 \text {Subst}\left (\int \frac {1}{2 c+x^2} \, dx,x,\frac {c \tan (e+f x)}{\sqrt {c-c \sec (e+f x)}}\right )}{4 a c f}\\ &=-\frac {3 \tan ^{-1}\left (\frac {\sqrt {c} \tan (e+f x)}{\sqrt {2} \sqrt {c-c \sec (e+f x)}}\right )}{4 \sqrt {2} a c^{3/2} f}-\frac {3 \tan (e+f x)}{4 a f (c-c \sec (e+f x))^{3/2}}+\frac {\tan (e+f x)}{f (a+a \sec (e+f x)) (c-c \sec (e+f x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.41, size = 183, normalized size = 1.50 \begin {gather*} \frac {e^{-\frac {1}{2} i (e+f x)} \left (\frac {6 \sqrt {2} e^{-i (e+f x)} \left (-1+e^{i (e+f x)}\right )^2 \left (1+e^{i (e+f x)}\right ) \tanh ^{-1}\left (\frac {1+e^{i (e+f x)}}{\sqrt {2} \sqrt {1+e^{2 i (e+f x)}}}\right )}{\sqrt {1+e^{2 i (e+f x)}}}-8 (-3+\cos (e+f x))\right ) \csc (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+i \sin \left (\frac {1}{2} (e+f x)\right )\right )}{32 a c f \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(265\) vs.
\(2(105)=210\).
time = 2.23, size = 266, normalized size = 2.18
method | result | size |
default | \(\frac {\left (-1+\cos \left (f x +e \right )\right )^{2} \left (\left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {5}{2}} \cos \left (f x +e \right )+\left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {5}{2}}+\cos \left (f x +e \right ) \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {3}{2}}-\left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {3}{2}}-3 \cos \left (f x +e \right ) \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}-3 \cos \left (f x +e \right ) \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right )+3 \sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+3 \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right )\right )}{2 a f \left (\frac {c \left (-1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}\right )^{\frac {3}{2}} \sin \left (f x +e \right )^{3} \left (-\frac {2 \cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}\right )^{\frac {3}{2}}}\) | \(266\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.09, size = 357, normalized size = 2.93 \begin {gather*} \left [-\frac {3 \, \sqrt {2} \sqrt {-c} {\left (\cos \left (f x + e\right ) - 1\right )} \log \left (\frac {2 \, \sqrt {2} {\left (\cos \left (f x + e\right )^{2} + \cos \left (f x + e\right )\right )} \sqrt {-c} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} + {\left (3 \, c \cos \left (f x + e\right ) + c\right )} \sin \left (f x + e\right )}{{\left (\cos \left (f x + e\right ) - 1\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 4 \, {\left (\cos \left (f x + e\right )^{2} - 3 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{16 \, {\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}, \frac {3 \, \sqrt {2} \sqrt {c} {\left (\cos \left (f x + e\right ) - 1\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {c} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) - 2 \, {\left (\cos \left (f x + e\right )^{2} - 3 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{8 \, {\left (a c^{2} f \cos \left (f x + e\right ) - a c^{2} f\right )} \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec {\left (e + f x \right )}}{- c \sqrt {- c \sec {\left (e + f x \right )} + c} \sec ^{2}{\left (e + f x \right )} + c \sqrt {- c \sec {\left (e + f x \right )} + c}}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.63, size = 97, normalized size = 0.80 \begin {gather*} \frac {\sqrt {2} {\left (3 \, \sqrt {c} \arctan \left (\frac {\sqrt {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c}}{\sqrt {c}}\right ) - 2 \, \sqrt {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c} - \frac {\sqrt {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}\right )}}{8 \, a c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\cos \left (e+f\,x\right )\,\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________